package com.yuexun.beilunpatient.ui.satisfaction.api;


import com.yuexun.beilunpatient.base.BaseEntity;
import com.yuexun.beilunpatient.ui.satisfaction.bean.SatisfactionAnswerDtlBean;
import com.yuexun.beilunpatient.ui.satisfaction.bean.SatisfactionDateBean;
import com.yuexun.beilunpatient.ui.satisfaction.bean.SatisfactionDtlBean;
import com.yuexun.beilunpatient.ui.satisfaction.bean.SatisfactionTypeBean;
import com.yuexun.beilunpatient.ui.satisfaction.bean.StartSatisfactionBean;
import com.yuexun.beilunpatient.ui.satisfaction.bean.TemplateBean;
import com.yuexun.beilunpatient.ui.satisfaction.bean.TemplateTypeBean;

import java.util.Map;

import retrofit.http.FieldMap;
import retrofit.http.FormUrlEncoded;
import retrofit.http.POST;
import rx.Observable;

/**
 * Created by wangt on 2017/8/22.
 */

public interface SatisfactionApi {

    /**
     * 查询模板类型列表
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("inquireSatisfactionTemplateList.json?")
    Observable<BaseEntity<SatisfactionTypeBean>> getSatisfactionTypeList(@FieldMap Map<String, String> praise);

    /**
     * 查询个人的院内调查分页列表
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("inquireUserSatisfactionPageList.json")
    Observable<BaseEntity<SatisfactionDateBean>> inquireUserSurveyPageList(@FieldMap Map<String, String> praise);

    /**
     * 新建满意度调查参与内容(开始满意度调查)
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("startSatisfactionAnswer.json?")
    Observable<BaseEntity<StartSatisfactionBean>> startSatisfaction(@FieldMap Map<String, String> praise);

    /**
     * 查询满意度调查模板详情
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("inquireSatisfactionTemplateDtl.json")
    Observable<BaseEntity<SatisfactionDtlBean>> getSatisfactionDtl(@FieldMap Map<String, String> praise);

    /**
     * 查询满意度调查参与内容详情
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("inquireSatisfactionAnswerDetail.json?")
    Observable<BaseEntity<SatisfactionAnswerDtlBean>> getSatisfactionAnswerDtl(@FieldMap Map<String, String> praise);

    /**
     * 更新满意度调查内容
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("updateSatisfactionAnswer.json?")
    Observable<BaseEntity<String>> updateSatisfactionAnswer(@FieldMap Map<String, String> praise);

    /**
     * 模板类型列表
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("inquireSatisfactionTemplateTypeList.json?")
    Observable<BaseEntity<TemplateTypeBean>> inquireSatisfactionTemplateTypeList(@FieldMap Map<String, String> praise);

    /**
     * 模板列表
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("inquireSatisfactionTemplateList.json?")
    Observable<BaseEntity<TemplateBean>> inquireSatisfactionTemplateList(@FieldMap Map<String, String> praise);

    /**
     * 用户发起满意度调查
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("createSatisfactionByUser.json?")
    Observable<BaseEntity<String>> createSatisfactionByUser(@FieldMap Map<String, String> praise);
}
